package boot.spring.type.topic.listener;

import java.io.IOException;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import boot.spring.po.Mail;



@Component
public class TopicListener {
	@RabbitListener(queues = "topicqueue1")
	public void displayTopic1(Mail mail) throws IOException {
		System.out.println("从topicqueue1取出消息"+mail.toString());
		}
	@RabbitListener(queues = "topicqueue2")
	public void displayTopic2(Mail mail) throws IOException {
		System.out.println("从topicqueue2取出消息"+mail.toString());
	}
}
